{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>博物馆参观指南</title>
    <!-- plugins:css -->
    <link rel="shortcut icon" href="{% static '/images/logo.svg' %}" type="image/x-icon">
    <link rel="stylesheet" href="{% static 'vendors/mdi/css/materialdesignicons.min.css' %}">
    <link rel="stylesheet" href="{% static 'vendors/base/vendor.bundle.base.css' %}">
    <!-- endinject -->
    <!-- plugin css for this page -->
    <link rel="stylesheet" href="{% static 'vendors/datatables.net-bs4/dataTables.bootstrap4.css' %}">
    <!-- End plugin css for this page -->
    <!-- inject:css -->
    <link rel="stylesheet" href="{% static 'css/style.css' %}">
    <!-- endinject -->
    <script type="text/javascript" src="{% static 'js/echarts.min.js' %}"></script>
    <script src="{% static 'js/jquery-3.6.0.min.js' %}"></script>
</head>

<body>
  <div class="container-scroller">
    <div class="container-fluid page-body-wrapper full-page-wrapper">
      <div class="content-wrapper d-flex align-items-stretch auth auth-img-bg">
        <div class="row flex-grow">
          <div class="col-lg-6 d-flex align-items-center justify-content-center">
            <div class="auth-form-transparent text-left p-3">
              <div class="brand-logo">
                <img src="{% static 'images/logo.svg' %}" alt="logo">
              </div>
              <h4>用户登录?</h4>
              <h6 class="font-weight-light">Hello! let's get started</h6>
        <form method="post" novalidate class="pt-3">
            {% csrf_token %}
            {% for field in form %}
                {% if field.name == 'code' %}
                    <div class="form-group">
                        <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                    <div class="input-group">

                                {{ field }}


                                <div class="input-group-append">

                                                   <img id="imageCode" src="{% url 'image_code' %}" alt="图片验证码">
                                                </div>

                            </div>
                        <span class="text-danger">{{ field.errors.0 }}</span>
                    </div>
                {% else %}
                    <div class="form-group">
                        <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                        {{ field }}
                        <span class="text-danger">{{ field.errors.0 }}</span>
                    </div>
                {% endif %}
            {% endfor %}
            <div>
            </div>
        <div class="row">
                <div class="col-lg-12">
<input  type="submit" class="btn btn-block btn-primary btn-lg font-weight-medium auth-form-btn" value="登  录"/>                </div>
            </div>
         <div class="text-center mt-4 font-weight-light">
                  <a href="{% url 'login_sms' %}" class="text-primary">   短信验证码登录 &nbsp;&nbsp;&nbsp;</a>
             <a href="{% url 'register' %}" class="text-primary">没有账号，去注册</a>
                </div>

        </form>

            </div>
          </div>
          <div class="col-lg-6 register-half-bg d-flex flex-row">
            <p class="text-white font-weight-medium text-center flex-grow align-self-end">&copy; Museum Guide.</p>
          </div>
        </div>
      </div>
      <!-- content-wrapper ends -->
    </div>
    <!-- page-body-wrapper ends -->
  </div>
  <!-- container-scroller -->
  <!-- plugins:js -->
  <script src="{% static 'vendors/base/vendor.bundle.base.js' %}"></script>
  <script src="{% static 'js/hoverable-collapse.js' %}"></script>
  <script src="{% static 'js/template.js' %}"></script>
  <script src="{% static 'js/off-canvas.js' %}"></script>
  <style>
      .auth .register-half-bg {
    background: url({% static 'images/故宫.jpeg' %});
    background-size: cover;
}
  </style>
  <!-- endinject -->
</body>

</html>
